package com.example;

import org.springframework.ai.tool.ToolCallback;
import org.springframework.ai.tool.ToolCallbacks;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

import java.util.List;

@SpringBootApplication
public class McpDemoApplication {
    public static void main(String[] args) {
        SpringApplication.run(McpDemoApplication.class, args);
    }

    /**
     * 告诉大模型可以调用哪些工具
     */
    @Bean
    public List<ToolCallback> aopminTools(CourseSerivce courseSerivce){
        return List.of(ToolCallbacks.from(courseSerivce));
    }
}
